<template>
	<view class="mask" v-if="show">
		<view class="overlay-wrap">
			<view class="container">
				<!-- 头部 -->
				<view class="container__header">
					<view class="iconfont icon-guanyu error-icon"></view>
				</view>
				<!-- 内容区 -->
				<view class="container__content" v-html="content">
				</view>
				<!-- 底部按钮 -->
				<view class="container__bottom">
					<view class="btn btn-cancle" @click="comfirm('cancle')">
						{{cancleBtn}}
					</view>
					<view class="btn btn-comfirm" @click="comfirm('login')">
						{{loginBtn}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>s

<script>
	// import CustomPopover from '@/components/CustomPopover.vue'

	export default {
		// components: {
		// 	CustomPopover
		// },
		props: {},
		data() {
			return {
				content: 'our account has been logged into OMLOOK in another location and has been forced to go offline.<br/>Please confirm whether it is your own operation.',
				cancleBtn: '取消',
				loginBtn: '登录',
				show: true
			}
		},
		methods: {
			comfirm(e) {
				this.show = false
				console.log(e);
				return e
			}
		}

	}
</script>

<style lang="scss" scoped>
	.mask {
		z-index: 10070;
		transition-duration: 300ms;
		transition-timing-function: ease-out;
		position: fixed;
		inset: 0px;
		z-index: 10070;
		background-color: rgba(0, 0, 0, 0.3);
		transition-property: opacity;
		display: flex;
		flex-direction: column;
		flex-shrink: 0;
		flex-grow: 0;
		flex-basis: auto;
		align-items: stretch;

		.overlay-wrap {
			display: flex;
			flex-direction: row;
			justify-content: center;
			align-items: center;
			flex: 1;
		}
	}

	.container {
		box-sizing: border-box;
		width: 560rpx;
		padding: 40rpx;
		background: #FFFFFF;
		border-radius: 50rpx;

		&__header {
			text-align: center;
			margin-bottom: 30rpx;

			.error-icon {
				display: inline-block;
				font-size: 80rpx;
				color: #fe6600;
			}
		}

		&__content {
			font-size: 24rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #878787;
			line-height: 32rpx;
			margin-bottom: 48rpx;
		}

		&__bottom {
			display: flex;
			justify-content: flex-end;

			.btn {
				font-size: 26rpx;
				font-family: Source Han Sans CN;
				font-weight: 500;
			}

			.btn-cancle {
				color: #61BDB2;
				line-height: 54rpx;
			}

			.btn-comfirm {
				padding: 0 30rpx;
				height: 54rpx;
				line-height: 54rpx;
				background-color: #61BDB2;
				border-radius: 16rpx;
				color: #FFFFFF;
				margin-left: 20rpx;
			}
		}
	}
</style>